package cn.tedu.csmall.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class CategoryUpdateInfoParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "类别名称不能为空")
    @ApiModelProperty(value = "类别名称", required = true, example = "可乐的类别")
    private String name;

    @ApiModelProperty(value = "类别关键词")
    private String keywords;

    @NotNull(message = "排序序号不能为空")
    @Range(max = 99, message = "排序序号值必须0~99之间")
    @ApiModelProperty(value = "类别排序,必须是0~255之间的数字", required = true, example = "97")
    private Integer sort;

    @ApiModelProperty(value = "类别图标")
    private String icon;

}
